from typing import AnyStr
from requests import Session
from utils.common_sydr import reqMethod




# /topicapi/smartPaper/front/freePracticeListTopic
def freePracticeListTopic(uri:AnyStr,data,session:Session):
    argsPosition = {"body": "str"}
    return reqMethod(uri, data, session, "post", argsPosition)

# /topicapi/smartPaper/front/smartPaperListTopic
def smartPaperListTopic(uri:AnyStr,data,session:Session):
    argsPosition = {"body": "str"}
    return reqMethod(uri, data, session, "post", argsPosition)


# /topicapi/smartPaper/front/submit
def freePracticeSubmit(uri:AnyStr,data,userId,otopicList,session:Session,stopicList=None):
    argsPosition = {"body": "str"}
    L=[]
    L.append(userId)
    L.append(otopicList)
    if stopicList is not None:
        L.append(stopicList)
    return reqMethod(uri, data, session, "post", argsPosition,L)


# /topicapi/tmsExam/front/fetchExamResultSimple
def fetchExamResultSimple(uri:AnyStr,data,examId,session:Session):
    argsPosition = {"uri": "dict"}
    L=[]
    L.append(examId)
    return reqMethod(uri, data, session, "get", argsPosition,L)